<template>
  <div>
    <!-- 操作日志 -->
    <LPTablePage
      :show-index="false"
      :show-indexfixed="false"
      index-label="序号"
      :table-data="tableData"
      :table-column="tableColumn"
      :show-page="true"
      align="center"
    >
      <template slot="operationType" slot-scope="{ row }">
        <!-- <el-tag v-if="row.operationType==1" type="success">管理员</el-tag>
        <el-tag v-else-if="row.operationType==2" type="success">成品物流</el-tag> -->
        <span>{{ row.userName }}</span>
      </template>
      <template slot="content" slot-scope="{ row }">
        <!-- <span>{{(row.content==''||row.content=='原因:')?row.title:row.content}}</span> -->
        <span>{{ row.content }}</span>
      </template>
    </LPTablePage>
  </div>
</template>

<script>
import LPTablePage from '@/components/LPTablePage/index.vue'

export default {
  components: { LPTablePage },
  props: {
    data: {
      type: Array,
      default: []
    }
  },
  data() {
    return {
      tableData: [],
      tableColumn: [
        { label: '操作时间', prop: 'operationTime', width: 150 },
        { label: '操作人', prop: 'operationType', width: 150, render: true },
        { label: '操作', prop: 'title', width: 150 },
        { label: '操作内容', prop: 'content', align: 'left', render: true }
      ]
    }
  },
  mounted() {
    this.tableData = this.data
  },
  methods: {}
}
</script>

<style scoped></style>
